<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>v-on:事件修饰符</title>
        <script src="js/vuejs-2.5.16.js"></script>
    </head>
    <body>
        <div id="app">
            <form @submit.prevent action="http://www.itheima.com" method="post">
                <input type="submit" value="提交">
            </form>

            <form action="http://www.itheima.com" method="post" onsubmit="return checkForm()">
                <input type="submit" value="提交">
            </form>

        </div>
    </body>
    <script>
        //view model
        new Vue({
            el:"#app"
        });

        //传统js方式
        function checkForm(){
            alert(1);
            //表单验证必须有一个明确的boolean类型返回值
            //在应用验证方法时必须加上 return 方法名称
            return false;
        }

    </script>
</html>